package ua.lviv.franko.triangulation.SaveStructures;

public class BaseFunctionValues {
	protected double[]	funcValue;
	protected double[]	funcDerivatyXValue;
	protected double[]	funcDerivatyYValue;

	public BaseFunctionValues(double[] funcValue, double[] funcDerivatyXValue, double[] funcDerivatyYValue) {
		this.funcValue = funcValue;
		this.funcDerivatyXValue = funcDerivatyXValue;
		this.funcDerivatyYValue = funcDerivatyYValue;
	}

	public BaseFunctionValues(int size) {
		this.funcDerivatyXValue = new double[size];
		this.funcDerivatyYValue = new double[size];
		this.funcValue = new double[size];
	}

	public double[] getFuncDerivatyXValue() {
		return funcDerivatyXValue;
	}

	public double getFuncDerivatyXValue(int pos) {
		return this.funcDerivatyXValue[pos];
	}

	public double[] getFuncDerivatyYValue() {
		return funcDerivatyYValue;
	}

	public double getFuncDerivatyYValue(int pos) {
		return this.funcDerivatyYValue[pos];
	}

	public double[] getFuncValue() {
		return funcValue;
	}

	public double getFuncValue(int pos) {
		return this.funcValue[pos];
	}

	public void setAll(int pos, double[] vals) {
		this.funcValue[pos] = vals[0];
		this.funcDerivatyXValue[pos] = vals[1];
		this.funcDerivatyYValue[pos] = vals[2];
	}

	public void setDerivatyXValue(int pos, double val) {
		this.funcDerivatyXValue[pos] = val;
	}

	public void setDerivatyYValue(int pos, double val) {
		this.funcDerivatyYValue[pos] = val;
	}

	public void setFuncDerivatyXValue(double[] funcDerivatyXValue) {
		this.funcDerivatyXValue = funcDerivatyXValue;
	}

	public void setFuncDerivatyYValue(double[] funcDerivatyYValue) {
		this.funcDerivatyYValue = funcDerivatyYValue;
	}

	public void setFuncValue(double[] funcValue) {
		this.funcValue = funcValue;
	}

	public void setValue(int pos, double val) {
		this.funcValue[pos] = val;
	}

}
